package main 

import (
	"fmt"
	"net"
)

func main(){


	conn,err:=net.Dial("tcp","127.0.0.1:12345")

	if err!=nil{
		fmt.Println("err=",err)
	}

	fmt.Printf("conn ok =%v\n",conn)

	var msg string="hello,world"
	n,err:=conn.Write([]byte(msg))
	if err!=nil{
		fmt.Println("write error=",err)
	}

	fmt.Printf("write %v bytes\n",n)
}